package cool.lichuan.project.common;

import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author LiChuan
 * @date 2021/11/13 16:02
 */
@Controller
public class ViewController {
    @GetMapping("/view/**")
    public String toPage(HttpServletRequest request) {
        return StrUtil.removePrefix(request.getRequestURI(), request.getContextPath() + "/view");
    }
}
